home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 44 / 044.d81 / desert trader (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  23KB  |  748 lines

  1. 1 rem
  2. 2 rem    (c) 1986 by mark martin
  3. 3 rem
  4. 4 rem
  5. 5 if ld%=1 then 7
  6. 6 print"[147]":ld%=1:load"sprite.ml",8,1
  7. 7 poke55,255:poke56,127:clr
  8. 8 poke56576,(peek(56576)and252)or1
  9. 9 poke53272,(peek(53272)and15)or.
  10. 10 poke648,128
  11. 11 print"[147]":gosub 547
  12. 12 dim ht$(7,2)
  13. 13 wf% = 8
  14. 14 wt% = 9
  15. 15 tn$="newtown":tn%=4:p1=80:p2=90:p3=40:p4=84:p5=60:p6=85:p7=50:p8=16
  16. 16 bar$="the liquor palace"
  17. 17 m1$="goruthan":m2$="clornik":m3$="largian":m4$="nervian":m5$="brogian"
  18. 18 m6$="bandit":m7$="cyclopian":m8$="yorchnoid"
  19. 19 s1=30:w1=0:w2=0:cr=250:f1=25:sn%=8:mx%=1
  20. 20 ht$(1,1)="books, weapons   ":ht$(1,2)="liquor, spices"
  21. 21 ht$(2,1)="weapons, crystals":ht$(2,2)="spices, tobacco"
  22. 22 ht$(3,1)="medicine, books  ":ht$(3,2)="rations, liquor"
  23. 23 ht$(4,1)="crystals, rations":ht$(4,2)="tobacco, medicine"
  24. 24 ht$(5,1)="liquor, spices   ":ht$(5,2)="books, weapons"
  25. 25 ht$(6,1)="spices, tobacco  ":ht$(6,2)="weapons, crystals"
  26. 26 ht$(7,1)="tobacco, medicine":ht$(7,2)="crystals, rations"
  27. 27 gosub316:pokevc+21,0
  28. 28 poke53280,2:poke53281,0
  29. 29 print chr$(142) "[147][152]" tab(3)"do you want a printed copy"
  30. 30 print tab(3)"of the game map? (y/n)"
  31. 31 print:print tab(3)"note: your printer must be able"
  32. 32 print tab(9)"to print graphic characters."
  33. 33 gosub 510: if a$="n" then 76: rem skip map hard-copy
  34. 34 print:print tab(3)"do you want hints printed also? (y/n)":gosub510
  35. 35 print:print tab(3)"be sure your printer is ready,"
  36. 36 print tab(3)"and press any key."
  37. 37 getc$: if c$="" then 37
  38. 38 open4,4,0:print#4
  39. 39 print#4,"  ";:for i=1to74: print#4,"[164]";:next i
  40. 40 print#4:print#4:print#4,chr$(15);chr$(14);
  41. 41 print#4,"             the great desert"
  42. 42 print#4,chr$(15):forx=1to5:print#4:nextx
  43. 43 print#4,"                    dustbowl 1":print#4:print#4
  44. 44 print#4,"                   [206][205] [206][205]                                 cyote 2"
  45. 45 print#4,"                 [206][205] [206][205]  [206][205] [206][205][206][205]"
  46. 46 print#4,"                 [206][205][206][205] [206][205]  [206][205]"
  47. 47 print#4,"                 [206][205]  [206][205][206][205] [206][205][206][205] [206][205][206][205]"
  48. 48 print#4,"                  [206][205] [206][205]  [206][205] [206][205][206][205] [206][205]"
  49. 49 print#4,"                [206][205][206][205][206][205]  [206][205] [206][205][206][205] [206][205]"
  50. 50 print#4,"          bizbee  [206][205][206][205] [206][205][206][205]  [206][205]  [206][205] [206][205][206][205]"
  51. 51 print#4,"            3       [206][205][206][205] [206][205]  [206][205][206][205] [206][205] [206][205]"
  52. 52 print#4,"                 [206][205]  [206][205][206][205] [206][205]  [206][205]       newtown"
  53. 53 print#4,"                   [206][205][206][205] [206][205] [206][205][206][205] [206][205]          4";
  54. 54 print#4,chr$(15);chr$(14);"    sand dunes"
  55. 55 print#4,chr$(15);"                 [206][205]  [206][205][206][205] [206][205][206][205] [206][205][206][205]"
  56. 56 print#4,"                  [206][205] [206][205]  [206][205] [206][205][206][205] [206][205]"
  57. 57 print#4,"                [206][205][206][205][206][205]  [206][205] [206][205][206][205] [206][205]"
  58. 58 print#4,"                    [206][205][206][205] [206][205]  [206][205][206][205] [206][205] [206][205]"
  59. 59 print#4,"                 [206][205]  [206][205][206][205] [206][205]  [206][205]        artel"
  60. 60 print#4,"                   [206][205][206][205] [206][205] [206][205][206][205] [206][205]           5"
  61. 61 print#4,"                 [206][205]  [206][205][206][205] [206][205][206][205] [206][205][206][205]"
  62. 62 print#4,"                  [206][205] [206][205]  [206][205] [206][205][206][205] [206][205]"
  63. 63 print#4,"                [206][205][206][205][206][205]  [206][205] [206][205][206][205] [206][205]"
  64. 64 print#4,"                     [206][205][206][205] [206][205][206][205] [206][205]"
  65. 65 print#4,"                         [206][205] [206][205][206][205]"
  66. 66 print#4,"                        [206][205] [206][205]"
  67. 67 print#4,"                   [206][205] [206][205]                              rocktowne 7"
  68. 68 print#4,"          desertvil 6"
  69. 69 if a$="n"then75
  70. 70 forx=1to3:print#4,"":nextx:print#4,"  ";:for i=1to74:print#4,"[164]";:next i
  71. 71 print#4,"":print#4,"":print#4,chr$(15);
  72. 72 print#4,chr$(14);"             items for trade:":print#4,chr$(15),""
  73. 73 print#4,spc(10)"cheap                                   expensive":print#4
  74. 74 forx=1to7:print#4,spc(6)str$(x)") "ht$(x,1)spc(23)ht$(x,2):next x
  75. 75 print#4,chr$(12):close4
  76. 76 p1$="crystal":p2$="weapons":p3$="books":p4$="medicine":p5$="tobacco"
  77. 77 p6$="spices":p7$="liquor":p8$="rations"
  78. 78 print"[147]do you want instructions (y/n)":gosub 510
  79. 79 if a$="n" then 92
  80. 80 rem print instructions----------
  81. 81 open 1,8,15:open 5,8,5,"0:instructions,s,r":gosub 528
  82. 82 if e% > 19 then 81
  83. 83 print chr$(14);:z$=chr$(.)
  84. 84 for x = 1 to 3
  85. 85 for y = 1 to 24
  86. 86 input#5, ln$: if asc(left$(ln$,1)+z$)<>151 then 88
  87. 87 a=len(ln$)-1:print "[155]" right$(ln$,a) :goto89
  88. 88 println$
  89. 89 nexty:poke198,.:wait198,1:next x: close 5: close 1
  90. 90 :
  91. 91 rem town menu------------------------
  92. 92 poke53280,2:printchr$(142)
  93. 93 print"[147][167][214][214][214][214][129][214][214][214][214][214][158][214][214][214][165]t[153]own  squar[154]e[167][214][214][214][214][214][214][214][214][156][214][214][214][214][165][152]"
  94. 94 sc% = 1: if nu=0 and cr=0 then 467
  95. 95 gosub455
  96. 96 print tab(wt%)"you're in ";tn$;"."
  97. 97 print tab(wt%)"where will you go?"
  98. 98 print tab(wt%)"(1) the bar"
  99. 99 print tab(wt%)"(2)[160]the weapon shoppe"
  100. 100 print tab(wt%)"(3) the merchant"
  101. 101 print tab(wt%)"(4) the doctor"
  102. 102 print tab(wt%)"(5) the map"
  103. 103 print tab(wt%)"(6) another town"
  104. 104 print tab(wt%)"(7) back to loadstar[145]"
  105. 105 max$="7": gosub 523
  106. 106 on a goto 107,157,233,427,611,321,9000
  107. 107 rem bar-----------------------------
  108. 108 print"[147][167][214][214][214][214][129][214][214][214][214][214][158][214][214][214][214][214][153][214][214][165]b a r[167][214][154][214][214][214][214][214][214][214][214][214][214][156][214][214][214][214][165][152]"
  109. 109 if spr%=1 then 111
  110. 110 sys 828,40960,"bar":spr%=1
  111. 111 gosub 589
  112. 112 gosub455:print tab(wt%)"welcome to":print tab(wt%)bar$
  113. 113 sd%=1:gosub536:sd%=0:gosub455
  114. 114 x=int(12*rnd(1))+1
  115. 115 on x goto 118, 122, 126, 130, 135, 138, 143, 147
  116. 116 goto 152
  117. 117 :
  118. 118 print tab(wt%)"a stranger picks":print tab(wt%)"a fight with you."
  119. 119 print tab(wt%)"he beats you up and":print tab(wt%)"tosses you in the"
  120. 120 print tab(wt%)"street.":goto156
  121. 121 :
  122. 122 print tab(wt%)"a stranger picks":print tab(wt%)"a fight with you."
  123. 123 print tab(wt%)"you beat him up and"
  124. 124 print tab(wt%)"throw him out of the":print tab(wt%)"bar.":goto156
  125. 125 :
  126. 126 print tab(wt%)"after a drink or":print tab(wt%)"two, a brawl starts"
  127. 127 print tab(wt%)"and you get beat up.":print tab(wt%)"you are tossed into"
  128. 128 print tab(wt%)"the street.":goto156
  129. 129 :
  130. 130 print tab(wt%)"after a drink or":print tab(wt%)"two, you gamble for"
  131. 131 print tab(wt%)"a while and loose 25"
  132. 132 print tab(wt%)"credits":cr=cr-25:ifcr<0thencr=0
  133. 133 goto156
  134. 134 :
  135. 135 print tab(wt%)"you feel lucky and":print tab(wt%)"decide to gamble."
  136. 136 print tab(wt%)"you win 25 credits!":cr=cr+25:goto156
  137. 137 :
  138. 138 print tab(wt%)"you try to pay for":print tab(wt%)"your drink an find"
  139. 139 print tab(wt%)"that your wallet is":print tab(wt%)"gone. a thief!"
  140. 140 cr=cr-50:ifcr<0thencr=0
  141. 141 goto 156
  142. 142 :
  143. 143 print tab(wt%)"you catch a thief":print tab(wt%)"trying to steal your"
  144. 144 printtab(wt%)"wallet. you get a":print tab(wt%)"50 credit reward!":cr=cr+50
  145. 145 goto 156
  146. 146 :
  147. 147 print tab(wt%)"you get stone blind":print tab(wt%)"drunk, and the law"
  148. 148 print tab(wt%)"fines you 10":print tab(wt%)"credits."
  149. 149 cr=cr-10: if cr<0 then cr=0
  150. 150 goto 156
  151. 151 :
  152. 152 print tab(wt%)"you relax and have a":print tab(wt%)"few drinks. nothing"
  153. 153 print tab(wt%)"interesting happens;":print tab(wt%)"so you leave."
  154. 154 cr=cr-2:ifcr<0thencr=0
  155. 155 :
  156. 156 gosub 536:goto 315
  157. 157 rem store---------------------------
  158. 158 if spr%=2 then 160
  159. 159 sys828,40960,"store":spr%=2
  160. 160 gosub 589
  161. 161 print"[147][167][214][214][214][214][129][214][214][214][214][214][158][214][214][214][214][214][153][165]weapons[167][214][154][214][214][214][214]